<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
?>
<!DOCTYPE html>
<html lang="zh-cn">
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <link href="<?=Yii::getAlias('@web/zui/css/zui.min.css')?>" rel="stylesheet">
        <link href="<?=Yii::getAlias('@web/zui/css/zui-theme.css')?>" rel="stylesheet">
        <style>
            html,body{
                width: 100%;
                height: 100%;
                position: relative;
            }
            .login-form{
                position: absolute;
                width: 400px;
                left: 50%;
                margin-left:-200px;
                top:50%;
                margin-top:-200px;;
            }

            form{
                border: 1px solid #ccc;
                padding: 1em;
                background-color: #efefef;
            }
        </style>
    </head>

    <body>
        <div class="login-form">
            <h1>登录</h1>
            <div class="row">
                <div class="col-md-12">
                    <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>

                    <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>

                    <?= $form->field($model, 'password')->passwordInput() ?>

                    <?= $form->field($model, 'rememberMe')->checkbox()?>

                    <div class="form-group">
                        <?= Html::submitButton('登录', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
                    </div>

                    <?php ActiveForm::end(); ?>
                </div>
            </div>
        </div>
    </body>
</html>
